import request from "../utils/request";

//查询的员工的数据
export const queryEmpApi = (name,gender,begin,end,page,pageSize) =>
  request.get(`/emps?name=${name}&gender=${gender}&begin=${begin}&end=${end}&page=${page}&pageSize=${pageSize}`);

//保存员工数据
export const addEmpApi = (employee) => request.post('/emps',employee);

//根据ID查询员工
export const queryByIdApi = (id) => request.get(`/emps/${id}`);

//修改员工
export const updateEmpApi = (employee) => request.put('/emps',employee);

//删除员工
export const deleteEmpApi = (ids) => request.delete(`/emps?ids=${ids}`);

//查询所有员工的数据
export const queryAllApi = () => request.get('/emps/list')